<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<%@ include file="jsp/common/StyleEUIMobile.jsp"%>
<%@ page import="com.onlineMIS.common.Common_util"%>
<title>千禧库房配货</title>
<script type="text/javascript" charset="utf-8">
//待配状态
var qxRange = <%=Common_util.QX_RANGE%>;
var xlcRange = <%=Common_util.XLC_RANGE%>;
var allRange = <%=Common_util.ALL__RANGE%>;
function login(){
	var qxIsChecked = $('#qxCheckBox').checkbox('options').checked;
	var xlcIsChecked = $('#xlcCheckBox').checkbox('options').checked;

	if(!qxIsChecked && !xlcIsChecked){
		$.messager.alert('提示','请选择要查看的配货单据范围','warning');
		return;
	}

	if(qxIsChecked){
		$("#ipadRange").val(qxRange);
	}
	if(xlcIsChecked){
		$("#ipadRange").val(xlcRange);
	}
	if(qxIsChecked && xlcIsChecked){
		$("#ipadRange").val(allRange);
	}

    var params=$("#loginForm").serialize(); 
    if ($('#loginForm').form('validate'))

    var url = "<%=request.getContextPath()%>/actionIpad/loginJSON!HqIpadLogin";
    $.post(url,params, loginBackProcess,"json");
}
function loginBackProcess(data){
	var response = data.response;
	var returnCode = response.returnCode;
	if (returnCode != SUCCESS){
		$.messager.alert('错误提示',response.message,'warning');
	} else {
		window.location.href = '<%=request.getContextPath()%>/actionIpad/hqIpadJSP!goNoEquipped';		 
	}
}


</script>
</head>
<body>
     <div class="easyui-navpanel" style="position:relative;padding:20px">
     	<header>
			<div class="m-toolbar">
				<div class="m-title">千禧库房配货</div>
			</div>
		</header>
		
	   <form id="loginForm" name="loginForm" cssClass="easyui-form" autocomplete="off">
		<div style="text-align:center">
		   
			<div style="margin-bottom:10px">
				库房登录端口
			</div>
			<div style="margin-bottom:10px">
				<input id="userName" name="user.user_name" type="text"  class="easyui-textbox"  prompt="用户名/用户ID" style="width:100%;height:30px"  data-options="required:true">
			</div>
			<div style="margin-bottom:10px">
				<input id="password" name="user.password" type="text"  class="easyui-textbox" prompt="密码" style="width:100%;height:30px"  data-options="required:true">
			</div>	
			<div style="margin-bottom:10px">
			  <input class="easyui-checkbox" id="qxCheckBox"  label="千禧：" labelWidth="45">
			   <input class="easyui-checkbox" id="xlcCheckBox"   label="禧乐仓：" labelWidth="55">
			    <input type="hidden"  id="ipadRange"  name="ipadRange"  >
       		 </div>
		
			<div  style="margin-bottom:10px">
				<a href="javascript:void(0)" class="easyui-linkbutton" style="width:100%;height:35px" onclick="login();">总部人员登录</a>
			</div>
			
		</div>
      </form>
      </div>


</body>
</html>